package com.sunwayworld.basemodule.common.errcode.code;

import com.sunwayworld.basemodule.common.errcode.module.LimsModule;
import com.sunwayworld.basemodule.common.errcode.module.Module;

//4位,相同的module写一起，用同一个区段的。不同module下的code可以一样，因为有全局的code
public enum LimsCode implements Code{
    RUNTIME_EXCEPTION(LimsModule.RUNTIME,"9999","异常"),

    /**************渲染报告码******************************/
    EXCEL_REPORT_SUCCESS(LimsModule.EXCEL_REPORT_RENDER,"0000","成功"),
    EXCEL_REPORT_PARAM_EXCEPTION(LimsModule.EXCEL_REPORT_RENDER,"0100","参数异常"),
    EXCEL_REPORT_NONE_MATCH_TEMPLATE(LimsModule.EXCEL_REPORT_RENDER,"0200","模板未匹配"),

    /**************测试数据码******************************/
    TEST_DATA_SUCCESS(LimsModule.TEST_DATA,"0000","成功"),
    TEST_DATA_NONE_MATCH_TASK_NAME(LimsModule.TEST_DATA,"1000","测试数据的测试项目命名错误"),
    TEST_DATA_NUKNOW_ERROR(LimsModule.TEST_DATA,"9999","未知错误"),

    STORAGE_BEFORE_TESTING_ERROR(LimsModule.TEST_DATA,"2001","存储前测试数据解析失败"),
    STORAGE_AFTER_TESTING_ERROR(LimsModule.TEST_DATA,"2002","存储后测试数据解析失败"),
    STORAGE_FLOAT_TESTING_ERROR(LimsModule.TEST_DATA,"2003","浮充测试数据解析失败"),
    STORAGE_FLOAT_TESTING_THIKNESS_ERROR(LimsModule.TEST_DATA,"2004","浮充测试数据解析失败"),
    /**************测试数据图片码******************************/
    TEST_DATA_IMG_SUCCESS(LimsModule.TEST_DATA_IMG,"0000","成功"),

    /**************测试数据统计码******************************/
    TEST_DATA_STATISTICS_SUCCESS(LimsModule.TEST_DATA_STATISTICS,"0000","成功");

    private Module module;
    private String code;
    private String name;
    LimsCode(Module module, String code, String name) {
        this.module = module;
        this.code = code;
        this.name = name;
    }
    @Override
    public String getCode() {
        return code;
    }
    @Override
    public String getName() {
        return name;
    }
    @Override
    public Module getModule() {
        return module;
    }

}
